package com.qianfeng1.day7_连接池.adj;


import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAdjusters;

/**
 * 作者：黎杭
 * 日期：2020/2/18
 */
public class Test {
    public static void main(String[] args) {
        LocalDate localDate = LocalDate.parse("2020-02-20");
        TemporalAdjuster next = TemporalAdjusters.next(DayOfWeek.TUESDAY);// 下周二的日期
        System.err.println(localDate.with(next)); // 输出下周二的时间
        System.err.println(localDate.with(TemporalAdjusters.firstDayOfMonth())); // 输出本月第一天
        System.err.println(localDate.with(TemporalAdjusters.lastDayOfMonth())); // 输出本月最后一天
    }
}
